import request from '@/utils/request.js'
import apis from '@/utils/api'
/**
 * @param {Object} params
 * 用户
 */
export function login(params) {
    return request.globalRequest(apis.login, 'POST', params)
}
export function getUserList(params) {
    return request.globalRequest(apis.getUserList, 'POST', params)
}
export function getUserNoAdmin(params) {
    return request.globalRequest(apis.getUserNoAdmin, 'POST', params)
}
export function addUser(params) {
    return request.globalRequest(apis.addUser, 'POST', params)
}
export function delUser(params) {
    return request.globalRequest(apis.delUser, 'POST', params)
}
export function userStatus(params) {
    return request.globalRequest(apis.userStatus, 'POST', params)
}

export function bindAuth(params) {
    return request.globalRequest(apis.bindAuth, 'POST', params)
}
export function getCurAuth(params) {
    return request.globalRequest(apis.getCurAuth, 'POST', params)
}
export function checkExistUser(params) {
    return request.globalRequest(apis.checkExistUser, 'POST', params)
}
export function updateUserInfo(params) {
    return request.globalRequest(apis.updateUserInfo, 'POST', params)
}
export function updatePassword(params) {
    return request.globalRequest(apis.updatePassword, 'POST', params)
}
export function changeAuth(params) {
    return request.globalRequest(apis.changeAuth, 'POST', params)
}

// 用户组
export function getUserGroup(params) {
    return request.globalRequest(apis.getUserGroup, 'POST', params)
}
export function addUserGroup(params) {
    return request.globalRequest(apis.addUserGroup, 'POST', params)
}

export default {
	login,
	getUserList,
	getUserNoAdmin,
	addUser,
	delUser,
	userStatus,
	bindAuth,
	getCurAuth,
	checkExistUser,
	updateUserInfo,
	updatePassword,
	changeAuth,
	
	
	getUserGroup,
	addUserGroup,
}